<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>DrawArea.angleGradientColor</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="DrawArea.htm">DrawArea</a>.<wbr>angleGradientColor</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public int angleGradientColor(double cx, double cy, double a1, double a2, double r1, double r2, int[] colorArray)
</div>
<p class="heading2">Description</p>
<div class="content">
Creates an angle gradient color.<br><br>
An angle gradient color is a color that depends on the compass bearing of the pixel relative to the center point. The north (upward) direction is zero degree, and the angle is the clockwise angle from the north direction.<br><br>
ChartDirector supports "smooth angle gradient" and "step angle gradient". For a smooth angle gradient, the color changes smoothly from one color stop to the next color stop. For a step angle gradient, the color remains unchanged between the color stops, but change abruptly once it reaches the next color stop.<br><br>
The color stops are defined as an array of offsets and colors. For a smooth angle gradient, the offsets and colors should be in the following format:<br><br>
<div class="indentedblock"><code>offset0, color0, offset1, color1, .... offsetN, colorN</code></div><br>
The first offset (offset0) should be 0, which represents the start angle of the gradient, and color0 is the color at that offset. The last offset (offsetN) can be any number not greater than 100000. It represents the end angle of the gradient, and colorN represents the color at the that offset. The other offsets and colors represent the angles and colors of the color stops in between.<br><br>
For a step angle gradient, the offsets and colors should be in the following format:<br><br>
<div class="indentedblock"><code>offset0, color0, offset1, color1, ...., offsetP, colorP, offsetN</code></div><br>
Note that for a step color gradient, there is one more offset than colors. If there are 10 color steps, it will have 10 colors and 11 offsets. The offsets represent angles and are interpreted the same as in smooth angle gradient. The colors are applied between the offsets. For example, color0 is the color between offset0 and offset1, and color1 is the color between offset1 and offset2.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>cx</td><td>(Mandatory)</td><td>The x coordinate of the center point.</td></tr><tr><td>cy</td><td>(Mandatory)</td><td>The y coordinate of the center point.</td></tr><tr><td>a1</td><td>(Mandatory)</td><td>The start angle of the gradient.</td></tr><tr><td>a2</td><td>(Mandatory)</td><td>The end angle of the gradient.</td></tr><tr><td>r1</td><td>(Mandatory)</td><td>The minimum radius for which the gradient is applicable.</td></tr><tr><td>r2</td><td>(Mandatory)</td><td>The maximum radius for which the gradient is applicable.</td></tr><tr><td>colorArray</td><td>(Mandatory)</td><td>An array defining the offsets and colors of the color stops along the gradient.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
A 32-bit integer representing the angle gradient color.
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
